﻿using Abp.Application.Services;
using FwProject.ShopApplication;
using FwProject.ShoppingMall.EventAdvertising;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using X.PagedList;

namespace FwProject.EventAdvertising.Dto
{
    /// <summary>
    /// 用户优惠券管理
    /// </summary>
   public interface IShopUserCouponAppService : IApplicationService
    {
        #region 优惠券管理
        /// <summary>
        /// 创建一个用户优惠券
        /// </summary>
        /// <param name="Input"></param>
        /// <returns></returns>
        Task<Guid> CreateShopUserCoupon(ShopUserCouponInput Input);
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="Id"></param>
        /// <param name="Input"></param>
        /// <returns></returns>
        Task EditShopUserCoupon(Guid Id, ShopUserCouponInput Input);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task CleanRemoveShopUserCoupon(Guid Id);
        /// <summary>
        /// 获取app用户自己的优惠券
        /// </summary>
        /// <param name="page">页数</param>
        /// <param name="pageSize">条数</param>
        /// <param name="useStatus">使用装填</param>
        /// <param name="CouponTitile">优惠券名称</param>
        /// <param name="beginTime">开始时间</param>
        /// <param name="endTime">结束使用时间</param>
        /// <param name="coupontype">优惠券使用类别</param>
        /// <param name="usecoupon">优惠券使用范围</param>
        /// <returns></returns>
        Task<IPagedList<ShopUserCouponDto>> GetSelfCouponPageList(int page, int pageSize, UseStatus? useStatus, string CouponTitile, DateTime? beginTime, DateTime? endTime, CouponType? coupontype, UseCoupon? usecoupon, int overdue = 0);

        /// <summary>
        /// 根据当前类别查询可用的优惠券
        /// </summary>
        /// <param name="page">页数</param>
        /// <param name="pageSize">条数</param>
        /// <param name="Producttypeguid">类别编号</param>
        /// <returns></returns>
        Task<IPagedList<ShopUserCouponDto>> GetSelfAvailableCouponPageList(int page, int pageSize,  List<OrderShopUserCoupon> Producttypeguid);
        /// <summary>
        /// 批量删除自己的优惠券
        /// </summary>
        /// <param name="Ids"></param>
        /// <returns></returns>

        Task CleanRemoveListShopUserCoupon(List<Guid> Ids);
        #endregion

        #region 后台管理

        Task<LayerDataBaseDto> GetUserCouponLayerDataAsync(int page, int limit,Guid couponid);

        /// <summary>
        /// 获取会员信息
        /// </summary>
        /// <returns></returns>
        Task<LayerDataBaseDto> GetMemberLayerDataAsync(int page, int limit, string keyword);

        /// <summary>
        /// 批量保存
        /// </summary>
        /// <param name="Input"></param>
        /// <returns></returns>
        Task BatchSaveShopUserCouponAsync(Guid CouponId, string Members);
        #endregion

    }
}
